home *** CD-ROM | disk | FTP | other *** search
- /////////////////////////////////////
- // Application (ReusableCompoenents)
- // by Charles Lloyd
- //////////////////////////////////////
-
- id componentNames;
- id TheDescriptionTables;
-
- ////////////////////////////
- // PathForResource
- ////////////////////////////
- - _pathForResource:aResourceName ofType:anExtension
- inComponentWithName:aComponentName
- {
- // This will handle the obsolete code problem when Beta one is over.
- // This is a convenient method, so I'll keep it.
- id aResourcePath = [NSString stringWithFormat:@"%@.wo/%@",
- aComponentName, aResourceName];
- aResourcePath = [WOApp pathForResource:aResourcePath ofType:anExtension];
- return aResourcePath;
- }
-
- ////////////////////////////
- // Description Table Access
- ////////////////////////////
- - _descriptionsForComponentNamed:aComponentName
- {
- id aFilePathName = [self _pathForResource:@"Description" ofType:@"plist"
- inComponentWithName:aComponentName];
- id aString = [NSString stringWithContentsOfFile:aFilePathName];
-
- id aDescriptionTable = [aString propertyList];
- return aDescriptionTable;
- }
-
- - descriptionsForComponentNamed:aComponentName
- {
- id aDescriptionTable = [TheDescriptionTables objectForKey:aComponentName];
- if (!aDescriptionTable) {
- aDescriptionTable = [self _descriptionsForComponentNamed:
- aComponentName];
- [TheDescriptionTables setObject:aDescriptionTable
- forKey:aComponentName];
- }
- return aDescriptionTable;
- }
-
- - awake
- {
- TheDescriptionTables = [NSMutableDictionary dictionary];
- [WOApp setSessionTimeOut:10.0];
- }
-
- - willGenerateResponse:aResponse inContext:aContext
- {
- // This is is for NeXT internal servers only.
- // All other servers will ignore.
- id d;
-
- d=[NSMutableDictionary dictionaryWithDictionary: [aResponse headers]];
- [d setObject:@"True" forKey:@"dshttpd-NoAutomaticFooter"];
- [aResponse setHeaders: d];
- }
-